Interface PortSecurity

All Superinterfaces:
IPCObject, Process
All Known Implementing Classes:
PortSecurityImpl

public interface PortSecurity extends Process
Information provided by the PKI file:

    \class PortSecurity
    
    \brief PortSecurity handles and manipulates port security on switch ports.
    
    \example network().getDevice("Switch0").getPort("FastEthernet0/1").getPortSecurity()
    
Author:
Auto-generated
  • Method Details

    • isEnabled

      boolean isEnabled()
      Information provided by the PKI file:
      
          \brief Returns true if port security is enabled, otherwise false.
          
          \return bool, true if port security is enabled, otherwise false.
          
              
      Returns:
      boolean Returns a boolean
    • setEnabled

      void setEnabled(boolean bEnable)
      Information provided by the PKI file:
      
          \brief Enables or disables port security.
          
          \param bEnable, true to enable port security, false to disable it.
          
              
      Parameters:
      bEnable - Takes in a parameter of bEnable
    • setMaxMacNumber

      boolean setMaxMacNumber(int max)
      Information provided by the PKI file:
      
          \brief Sets the port security max-mac-count.
          
          \param max, the port security max-mac-count value.
          
          \return bool, true if successful, otherwise false.
          
              
      Parameters:
      max - Takes in a parameter of max
      Returns:
      boolean Returns a boolean
    • getMaxMacNumber

      int getMaxMacNumber()
      Information provided by the PKI file:
      
          \brief Returns the port security max-mac-count.
          
          \return int, the port security max-mac-count value.
          
              
      Returns:
      int Returns a int
    • getTotalMac

      int getTotalMac()
      Information provided by the PKI file:
      
          \brief Returns the total number of MAC addresses.
          
          \return int, the total number of MAC addresses.
          
              
      Returns:
      int Returns a int
    • getViolationCount

      int getViolationCount()
      Information provided by the PKI file:
      
          \brief Returns the number of violations.
          
          \return int, the number of violations.
          
              
      Returns:
      int Returns a int
    • getLastSourceMacVlan

      Pair<MACAddress,Integer> getLastSourceMacVlan()
      Information provided by the PKI file:
      
          \brief Returns the last source MAC address and VLAN number.
          
          \return pair<mac, int>, the last source MAC address and VLAN number.
          
              
      Returns:
      Pair<MACAddress, Integer> Returns a Pair<MACAddress, Integer>
    • setViolationMode

      void setViolationMode(PortViolation type)
      Information provided by the PKI file:
      
          \brief Sets the violation mode.
          
          \param type,        the violation mode.
          Violation modes:    eShutdown = 0,
          eProtect = 1,
          eRestrict = 2
          
              
      Parameters:
      type - Takes in a parameter of type
    • addSecureMacEntry

      boolean addSecureMacEntry(MACAddress macAddress, boolean isSticky)
      Information provided by the PKI file:
      
          \brief Adds a secure MAC address entry.
          
          \param macAddress, the MAC address to add.
          \param isSticky, true for sticky, false for not sticky.
          
          \return bool, true if successful, otherwise false.
          
              
      Parameters:
      macAddress - Takes in a parameter of macAddress
      isSticky - Takes in a parameter of isSticky
      Returns:
      boolean Returns a boolean
    • removeSecureMacEntry

      boolean removeSecureMacEntry(MACAddress macAddress)
      Information provided by the PKI file:
      
          \brief Removes the specified secure MAC address entry.
          
          \param macAddress, the MAC address to remove.
          
          \return bool, true if successful, otherwise false.
          
              
      Parameters:
      macAddress - Takes in a parameter of macAddress
      Returns:
      boolean Returns a boolean
    • getSecureMacCount

      int getSecureMacCount()
      Information provided by the PKI file:
      
          \brief Returns the number of secure MAC addresses.
          
          \return int, the number of secure MAC addresses.
          
              
      Returns:
      int Returns a int
    • secureMacExist

      boolean secureMacExist(MACAddress macAddress)
      Information provided by the PKI file:
      
          \brief Returns true if the specified secure MAC address exists, otherwise false.
          
          \param macAddress, the MAC address of interest.
          
          \return bool, true if the specified secure MAC address exists, otherwise false.
          
              
      Parameters:
      macAddress - Takes in a parameter of macAddress
      Returns:
      boolean Returns a boolean
    • getPort

      Port getPort()
      Information provided by the PKI file:
      
          \brief Returns the switch port.
          
          \return Port, the Port object.
          
              
      Returns:
      Port Returns a Port
    • isStickyOn

      boolean isStickyOn()
      Information provided by the PKI file:
      
          \brief Returns true if sticky is enabled, otherwise false.
          
          \return bool, true if sticky is enabled, otherwise false.
          
              
      Returns:
      boolean Returns a boolean
    • setStickyflag

      void setStickyflag(boolean isSticky)
      Information provided by the PKI file:
      
          \brief Enables or disables sticky.
          
          \param isSticky, true to enable sticky, false to disable it.
          
              
      Parameters:
      isSticky - Takes in a parameter of isSticky